<php>if(empty($list)) {</php>暂无更多信息<php>}</php>
	<volist name="list" id="feed">
		<div class="c_notify" id="notify_<php>echo $feed['id']</php>">
            <!-- <a class="btn-delete" href="javascript:void(0);" onclick="ui.confirm(this,'确定要删除该消息？',function(){delnotify(<php>echo $feed['id']</php>)})"></a> -->
			<!-- 消息 -->
			<div class="c_content">
				<!-- 替换网页版的链接地址 -->
				<php>
					 echo $feed['body'];
				</php>
			</div>
		</div>
	</volist>
<php>if($count>20){</php>
<!-- 分页 -->
<div id="pager_box">
    <php>if(empty($_GET['page']) || $_GET['page']==1){</php>
            <a href="javascript:;" link="" id="prev" class="pager_child pager_p_n_none pure-button pure-button-disabled">上一页</a>
    <php>}else{</php>
            <a href="javascript:;" data-link="{:U('w3g/Message/notify',array('page'=>$page-1))}" id="prev" class="pager_child pager_p_n pure-button  pure-button-primary ts-listen" data-listen="weibo-pagerReplace-click" data-for="notify">上一页</a>
    <php>}</php>
    <select id="page_sel" class="pager_child pure-button ts-listen" data-listen="weibo-pagerReplace-change" data-for="notify">
            <php>
                    $_GET['page']!=0?$get=$_GET['page']:$get=1;
                    $_count = ceil($count/20);
                    if($get<6){
                            for($i=0;$i<($_count);$i++){
                                    $get==$i+1?$selected='selected="selected"':$selected='';
                                    if($i>9){
                                            break;
                                    }
            </php>
            <option value="{:U('w3g/Message/notify')}&page={$i+1}" <php>echo $selected;</php>>第{$i+1}页</option>
            <php>	}
                    }elseif($get>=6){
                            for($i=($get-5);$i<$get;$i++){
                                    $get==$i+1?$selected='selected="selected"':$selected='';
            </php>
            <option value="{:U('w3g/Message/notify')}&page={$i+1}" <php>echo $selected;</php>>第{$i+1}页</option>
            <php>	}</php>
            <php>	for($i=$get;$i<($get+5);$i++){
                                    $get==$i+1?$selected='selected="selected"':$selected='';
                                    if($i>$_count-1){
                                            break;
                                    }
            </php>
            <option value="{:U('w3g/Message/notify')}&page={$i+1}" <php>echo $selected;</php>>第{$i+1}页</option>
            <php>	}</php>
            <php>}</php>

    </select>
    <php>if($get == ($_count)) {</php>
            <a href="javascript:;" link="" id="next" class="pager_child pager_p_n_none pure-button pure-button-disabled">下一页</a>
    <php>}else{</php>
            <a href="javascript:;" data-link="{:U('w3g/Message/notify',array('page'=>$page+1))}" id="next" class="ts-listen pager_child pager_p_n pure-button pure-button-primary" data-listen="weibo-pagerReplace-click" data-for="notify">下一页</a>
    <php>}</php>
</div>
<php>}</php>
<script>
    var fixUrl = function(){
        var aCache = $('.c_content').find('a');
        for(var i=0;i<aCache.length;i++){
            var a = $(aCache[i]);
            var url = a.attr('href');
            url = url.replace(SITE_URL,'');
            if(url =="/message"){
                a.attr('href',U('w3g/Message/index'));
            }else{
                if(/^\/[\w]+\/[\w\?\=\&\%]*/ig.test(url)){
                    if(/^\/space\/[0-9]+/ig.test(url)){
                        var maid = url.match(/[0-9]+$/ig);
                        if(maid!=null){
                            maid=maid[0];
                            a.attr('href',U('w3g/Index/weibo',new Array('uid='+maid)));
                        }
                    }else if(/^\/weibo\/[0-9]+\?uid\=[0-9]+$/ig.test(url)){
                        var tid = url.match(/[0-9]+/ig);
                        if(tid!=null){
                            tid=tid[tid.length-2];
                            a.attr('href',U('w3g/Index/detail',new Array('weibo_id='+tid)));
                        }
                    }else if(/^\/weibo\/[0-9]+\?uid\=[0-9]+\&digg\=1$/ig.test(url)){
                        var tid = url.match(/[0-9]+/ig);
                        if(tid!=null){
                            tid=tid[tid.length-3];
                            a.attr('href',U('w3g/Index/detail',new Array('weibo_id='+tid)));
                        }
                    }
                }else{
                    if(/^\/index\.php\?app\=public\&mod\=Profile\&act\=index\&uid\=[0-9]+$/ig.test(url)){
                        var maid = url.match(/[0-9]+$/ig);
                        if(maid!=null){
                            maid=maid[0];
                            a.attr('href',U('w3g/Index/weibo',new Array('uid='+maid)));
                        }
                    }else if(/^\/index\.php\?app\=public\&mod\=Index\&act\=detail\&weibo_id\=[0-9]+\&uid\=[0-9]+$/ig.test(url)){
                        var tid = url.match(/[0-9]+/ig);
                        if(tid!=null){
                            tid=tid[tid.length-2];
                            a.attr('href',U('w3g/Index/detail',new Array('weibo_id='+tid)));
                        }
                    }else if(/\/index\.php\?app\=public\&mod\=Profile\&act\=feed\&feed_id\=[0-9]+\&uid\=[0-9]+/ig.test(url)){
//                        var tid = url.match(/[0-9]+/ig);
                        var tid = url.match(/feed_id\=[0-9]+/)[0].replace('feed_id=','');
//                        if(tid!=null){
//                            tid=tid[tid.length-2];
                            a.attr('href',U('w3g/Index/detail',new Array('weibo_id='+tid)));
//                        }
                    }else if(/^\/index\.php\?app\=public\&mod\=Message\&act\=index$/ig.test(url)){
                        a.attr('href',U('w3g/Message/index'));
                    }else if(/^\/index\.php\?app\=public\&mod\=Topic\&act\=index\&k\=[\w\%]+/ig.test(url)){
                        var key=url.match(/[\w\%]+$/ig);
                        if(key!=null){
                            key=key[0];
                            a.attr('href',U('w3g/Index/doSearch',new Array('key='+key)));
                        }
                    }else if(/\/topic\?k\=[\w\%]+/ig.test(url)){
                        var key=url.match(/[\w\%]+$/ig);
                        if(key!=null){
                            key=key[0];
                            a.attr('href',U('w3g/Index/doSearch',new Array('key='+key)));
                        }
                    }
                    a.removeAttr('target');
                    // console.log(url);
                }
            }
        }
    }
    var delnotify =  function delnotify(id){
        $.post(U('public/Message/delnotify'),{id:id},function(){
              $('#notify_'+id).fadeOut('8000',function(){
                $(this).remove();
              });
        });
    
    };
</script>